# Contributor: Lindsay Zhou <i@lin.moe>
# Maintainer: Lindsay Zhou <i@lin.moe>
pkgname=fcitx5-rime
pkgver=5.1.9
pkgrel=0
pkgdesc="librime input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-rime"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fcitx5-qt-dev
	librime-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-rime/archive/refs/tags/$pkgver.tar.gz"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d960f4458d035bf51f81c1c41af2bce3866a8127857167abc1d83d3595ce7e25e2a3c43fbac2e867ec1d241fc2b92ec05f3e46e5bb7eb34e2e20fa468c4536f5  fcitx5-rime-5.1.9.tar.gz
"
